<?php

class Page {

  // Create required variables
  var $Title;
  var $MetaDescription;
  var $MetaKeywords;
  var $Content;
  var $ThisPage;

  // Standard page template
  function Template() {
    require_once('../config.php');
    echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
    echo "\n";
    echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';
    echo '<head profile="http://gmpg.org/xfn/11">';
    echo "\n";
    echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
    echo "\n";
    $this->DisplayTitle();
    echo "\n";
    $this->DisplayMetaDescription();
    echo "\n";
    $this->DisplayMetaKeywords();
    echo "\n";
    //echo '<link rel="stylesheet" href="style.css" type="text/css" media="screen" />';
    //TG 19/7/09
    require_once('./admin/theme/maintheme.php');
    echo "\n";
    echo '</head>';
    echo "\n";
    echo '<body>';
    echo "\n\n";
    echo '<div id="wrap">';
    echo "\n";
    echo '	<div id="header">';
    //TG 19/7/09
    require_once('./includes/header.php'); 
    echo '</div>';
    echo "\n";
    echo '	<div id="content">';
    echo "\n\n";
    echo $this->Content;
    $le_page = $this->ThisPage; // For navigation menu
    //echo $le_page. "xx";
    echo "\n	</div><!-- content_eof //-->\n";
    echo '	<div id="navigation">';
    echo "\n\n";
    echo '<ul id="menu">';
    echo "\n";
    if ($this->ThisPage == "index") {
      echo '<li><strong>Home Page</strong></li>';
    } else {
      
      echo '<li><a href="'.$wwwroot. '/" title="Home Page">Home Page</a></li>';
    }
    echo "\n";
    //TG 19/7/09
    include ('./classes/makebutton.class.php');
    //TG 19/7/09
    include ('./includes/menu.php');
    echo '<li><a href="'.$wwwroot. '/contact.php" title="Contact">Contact</a></li>';
    echo "\n</ul>\n\n";
    echo '	</div><!-- navigation_eof //-->';
    echo "\n";
    echo '	<div id="extra">';
    echo "\n\n";
    //TG 19/7/09
    include ('./includes/extra.php');
    echo "\n\n";
    echo '	</div><!-- extra_eof //-->';
    echo "\n";
    echo '	<div id="search">';
    echo "\n\n";
    //TG 19/7/09
    include ('./includes/searchform.php');
    echo "\n\n";
    echo '	</div><!-- search_eof //-->';
    echo "\n";
    echo '	<div id="footer">';
    echo "\n\n";
    echo '<p>';
    //TG
    include ('./includes/footer.php');
    echo "</p>\n\n";
    include ('./includes/tracking.php');
    echo "\n	</div><!-- footer_eof //-->\n";
    echo '</div><!-- wrap_eof //-->';
    echo "\n\n</body>\n</html>\n";
  }

  function DisplayTitle() {
    echo "<title>" . $this->Title . "</title>";
  }

  function DisplayMetaDescription() {
    echo '<meta name="description" content="' . $this->MetaDescription . '" />';
  }

  function DisplayMetaKeywords() {
    echo '<meta name="keywords" content="' . $this->MetaKeywords . '" />';
  }

  function DisplayThisPage() {
    echo $this->ThisPage;
  }

  function SetContent($Data) {
    $this->Content = $Data;
  }

}

?>
